# 登录综合案例
def login():
    phone = input("请输入手机号码:").strip()  # 去除空格
    password = input("请输入密码:").strip()
    code = input("请输入验证码:").strip()
    if phone == "":
        print("手机号为空")
        return
    elif password == "":
        print("密码为空")
        return
    elif code == "":
        print("验证码为空")
        return
    if len(phone) == 11:
        print("手机号格式正确")
    else:
        print("手机号格式错误")
        return
    if phone == "13488888888":
        print("手机号正确")
        if password == "123456":
            print("密码正确")
            if code == "8888":
                print("验证码正确")
                print("登录成功!")
            else:
                print("登陆失败！验证码错误")
                return
        else:
            print("登陆失败！密码错误")
            return
    else:
        print("登陆失败！手机号不存在")
        return


login()
